package com.gosophia.commons.web.bean;

import java.util.Map;

import org.apache.struts2.json.annotations.JSON;

/**
 * 
 * 功能：      列表表头页面初始化信息
 * @author renxuehui
 * @since  2010-9-19
 *  Copyright (c) 2010 Gosophia corporation All Rights Reserved
 */
public class ColumTitleInfo extends BaseUIInfo {

    /**
     * 显示宽度
     */
    private Float uiWidth;
    
    /**
     * 链接的URL地址
     * 格式：xxxAction.action?id=userId&&name=userName，其中参数userId、userName要求为同一个列表中的某一列对应的propertyName
     */
    private String linkURL;
    
    private Map<String,String> dataDictionarys;
    
    public ColumTitleInfo(){
        super();
    }
    
    public ColumTitleInfo(String cnFieldName, String propertyName, String uiType, Float uiWidth) {
        super(cnFieldName, propertyName, uiType);
        this.uiWidth = uiWidth;
    }

    public ColumTitleInfo(String cnFieldName, String propertyName, String uiType, Float uiWidth,
            String linkURL) {
        super(cnFieldName, propertyName, uiType);
        this.uiWidth = uiWidth;
        this.linkURL = linkURL;
    }

    public ColumTitleInfo(String cnFieldName, String propertyName,
            String uiType, Float uiWidth, String linkURL,
            Map<String, String> dataDictionarys) {
        super(cnFieldName, propertyName, uiType);
        this.uiWidth = uiWidth;
        this.linkURL = linkURL;
        this.dataDictionarys = dataDictionarys;
    }

    public ColumTitleInfo(String cnFieldName, String propertyName,
            String uiType, Float uiWidth, Map<String, String> dataDictionarys) {
        super(cnFieldName, propertyName, uiType);
        this.uiWidth = uiWidth;
        this.dataDictionarys = dataDictionarys;
    }

    @JSON(name="width")
    public Float getUiWidth() {
        return uiWidth;
    }

    public void setUiWidth(Float uiWidth) {
        this.uiWidth = uiWidth;
    }

    public String getLinkURL() {
        return linkURL;
    }

    public void setLinkURL(String linkURL) {
        this.linkURL = linkURL;
    }
    
    public Map<String, String> getDataDictionarys() {
        return dataDictionarys;
    }

    public void setDataDictionarys(Map<String, String> dataDictionarys) {
        this.dataDictionarys = dataDictionarys;
    }
}
